Fast, Interactive Python Charting Library

What is xy?

XY is a Python charting library for interactive 2D visualizations that stay smooth at millions of points and is completely customizable. Two ideas shape the library:

  • Fast, even with lots of data. XY draws the detail you can actually see instead of every row at once, so pan, zoom, and hover stay responsive as your data grows.
  • Completely customizable. Style titles, axes, legends, tooltips, and controls with CSS or Tailwind, and keep the same look in interactive charts, SVGs, and PNGs.

All four interactive charts are live — drag to pan, scroll to zoom, and hover to inspect exact values. Together they render more than a million points from a single probability field across four chart families. View the customizable Python source.

Early alpha. XY is pre-1.0. The declarative composition model is stabilizing, but callback payloads, the Reflex adapter, chart breadth, and adaptive-rendering thresholds may change. See Limitations and alpha status before committing to a long-lived integration.

Start here

Why XY

Python teams usually face a trade-off: charting libraries that hit an interactivity ceiling as data grows, or browser-first tools that give up design control. XY is built for the workflows where that trade-off bites. Compose marks, axes, legends, and controls in Python; brand them with CSS, Tailwind, and theme tokens; and ship the same chart to notebooks, applications, and standalone HTML, PNG, or SVG exports.

Performance is part of the architecture, not an option flag. Native Rust kernels aggregate data before display, binary transport keeps numbers out of JSON, and the WebGL2 client bounds browser work by what the screen can show, while exact source data stays in Python for hover and selection.

The numbers back this up. In the recorded 10-million-point launch benchmark, XY produced a static PNG in 0.023 s, while Matplotlib took 2.8 s and Plotly 9.6 s. XY reached first interactive render 16–20× sooner, peaking at a third of Matplotlib's memory and a twentieth of Plotly's.

10M-point cold-render time

900×420 output · mean of three isolated runs · shared linear scale

XY
Matplotlib
Plotly

The benchmark also tested one billion points. At that size XY switches to a density view, a heatmap-like summary of where the points fall, and still delivered a working interactive chart in just over a second. The default Matplotlib and Plotly approach of drawing every single point did not finish within the run's memory and time limits. Inspect the benchmark evidence or browse the chart gallery.

Install it and see for yourself:

Browse the chart gallery or jump straight to your first chart.

Built with Reflex